package ch.hearc.coursJava.kitBase.tools;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class NombreToolsTest
	{

	/*------------------------------------------------------------------*\
	 |*							Constructeurs							*|
	 \*------------------------------------------------------------------*/

	@Before
	public void before()
		{
		// rien
		}

	@After
	public void after()
		{
		// rien
		}

	/*------------------------------------------------------------------*\
	 |*							Methodes Public							*|
	 \*-----------------------------------------------------------------*/

	@Test
	public void testIsEgalEpsilon()
		{
		double a = 12.456789;
		double b = 12.456787;
		double epsilon = 0.00000001;

		assertFalse(NombreTools.isEgal(a, b, epsilon));

		epsilon = 0.000002;

		assertTrue(NombreTools.isEgal(a, b, epsilon));
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	}
